Integrand size = 33, antiderivative size = 202 \[ \int \frac {\sec ^4(c+d x) (A+B \sec (c+d x))}{\sqrt {a+a \sec (c+d x)}} \, dx=-\frac {\sqrt {2} (A-B) \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{\sqrt {a} d}+\frac {4 (49 A-37 B) \tan (c+d x)}{105 d \sqrt {a+a \sec (c+d x)}}+\frac {2 (7 A-B) \sec ^2(c+d x) \tan (c+d x)}{35 d \sqrt {a+a \sec (c+d x)}}+\frac {2 B \sec ^3(c+d x) \tan (c+d x)}{7 d \sqrt {a+a \sec (c+d x)}}-\frac {2 (7 A-31 B) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{105 a d} \]
-(A-B)*arctan(1/2*a^(1/2)*tan(d*x+c)*2^(1/2)/(a+a*sec(d*x+c))^(1/2))*2^(1/ 2)/d/a^(1/2)+4/105*(49*A-37*B)*tan(d*x+c)/d/(a+a*sec(d*x+c))^(1/2)+2/35*(7 *A-B)*sec(d*x+c)^2*tan(d*x+c)/d/(a+a*sec(d*x+c))^(1/2)+2/7*B*sec(d*x+c)^3* tan(d*x+c)/d/(a+a*sec(d*x+c))^(1/2)-2/105*(7*A-31*B)*(a+a*sec(d*x+c))^(1/2 )*tan(d*x+c)/a/d
Time = 0.43 (sec) , antiderivative size = 140, normalized size of antiderivative = 0.69 \[ \int \frac {\sec ^4(c+d x) (A+B \sec (c+d x))}{\sqrt {a+a \sec (c+d x)}} \, dx=\frac {\left (-105 \sqrt {2} (A-B) \text {arctanh}\left (\frac {\sqrt {1-\sec (c+d x)}}{\sqrt {2}}\right )+2 \sqrt {1-\sec (c+d x)} \left (91 A-43 B+(-7 A+31 B) \sec (c+d x)+3 (7 A-B) \sec ^2(c+d x)+15 B \sec ^3(c+d x)\right )\right ) \tan (c+d x)}{105 d \sqrt {1-\sec (c+d x)} \sqrt {a (1+\sec (c+d x))}} \]
((-105*Sqrt[2]*(A - B)*ArcTanh[Sqrt[1 - Sec[c + d*x]]/Sqrt[2]] + 2*Sqrt[1 - Sec[c + d*x]]*(91*A - 43*B + (-7*A + 31*B)*Sec[c + d*x] + 3*(7*A - B)*Se c[c + d*x]^2 + 15*B*Sec[c + d*x]^3))*Tan[c + d*x])/(105*d*Sqrt[1 - Sec[c + d*x]]*Sqrt[a*(1 + Sec[c + d*x])])
Time = 1.33 (sec) , antiderivative size = 226, normalized size of antiderivative = 1.12, number of steps used = 15, number of rules used = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.424, Rules used = {3042, 4509, 27, 3042, 4509, 27, 3042, 4498, 27, 3042, 4489, 3042, 4282, 216}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sec ^4(c+d x) (A+B \sec (c+d x))}{\sqrt {a \sec (c+d x)+a}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )^4 \left (A+B \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{\sqrt {a \csc \left (c+d x+\frac {\pi }{2}\right )+a}}dx\) |
\(\Big \downarrow \) 4509 |
\(\displaystyle \frac {2 \int \frac {\sec ^3(c+d x) (6 a B+a (7 A-B) \sec (c+d x))}{2 \sqrt {\sec (c+d x) a+a}}dx}{7 a}+\frac {2 B \tan (c+d x) \sec ^3(c+d x)}{7 d \sqrt {a \sec (c+d x)+a}}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\int \frac {\sec ^3(c+d x) (6 a B+a (7 A-B) \sec (c+d x))}{\sqrt {\sec (c+d x) a+a}}dx}{7 a}+\frac {2 B \tan (c+d x) \sec ^3(c+d x)}{7 d \sqrt {a \sec (c+d x)+a}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )^3 \left (6 a B+a (7 A-B) \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{\sqrt {\csc \left (c+d x+\frac {\pi }{2}\right ) a+a}}dx}{7 a}+\frac {2 B \tan (c+d x) \sec ^3(c+d x)}{7 d \sqrt {a \sec (c+d x)+a}}\) |
\(\Big \downarrow \) 4509 |
\(\displaystyle \frac {\frac {2 \int \frac {\sec ^2(c+d x) \left (4 a^2 (7 A-B)-a^2 (7 A-31 B) \sec (c+d x)\right )}{2 \sqrt {\sec (c+d x) a+a}}dx}{5 a}+\frac {2 a (7 A-B) \tan (c+d x) \sec ^2(c+d x)}{5 d \sqrt {a \sec (c+d x)+a}}}{7 a}+\frac {2 B \tan (c+d x) \sec ^3(c+d x)}{7 d \sqrt {a \sec (c+d x)+a}}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\frac {\int \frac {\sec ^2(c+d x) \left (4 a^2 (7 A-B)-a^2 (7 A-31 B) \sec (c+d x)\right )}{\sqrt {\sec (c+d x) a+a}}dx}{5 a}+\frac {2 a (7 A-B) \tan (c+d x) \sec ^2(c+d x)}{5 d \sqrt {a \sec (c+d x)+a}}}{7 a}+\frac {2 B \tan (c+d x) \sec ^3(c+d x)}{7 d \sqrt {a \sec (c+d x)+a}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )^2 \left (4 a^2 (7 A-B)-a^2 (7 A-31 B) \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{\sqrt {\csc \left (c+d x+\frac {\pi }{2}\right ) a+a}}dx}{5 a}+\frac {2 a (7 A-B) \tan (c+d x) \sec ^2(c+d x)}{5 d \sqrt {a \sec (c+d x)+a}}}{7 a}+\frac {2 B \tan (c+d x) \sec ^3(c+d x)}{7 d \sqrt {a \sec (c+d x)+a}}\) |
\(\Big \downarrow \) 4498 |
\(\displaystyle \frac {\frac {\frac {2 \int -\frac {\sec (c+d x) \left (a^3 (7 A-31 B)-2 a^3 (49 A-37 B) \sec (c+d x)\right )}{2 \sqrt {\sec (c+d x) a+a}}dx}{3 a}-\frac {2 a (7 A-31 B) \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{3 d}}{5 a}+\frac {2 a (7 A-B) \tan (c+d x) \sec ^2(c+d x)}{5 d \sqrt {a \sec (c+d x)+a}}}{7 a}+\frac {2 B \tan (c+d x) \sec ^3(c+d x)}{7 d \sqrt {a \sec (c+d x)+a}}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\frac {-\frac {\int \frac {\sec (c+d x) \left (a^3 (7 A-31 B)-2 a^3 (49 A-37 B) \sec (c+d x)\right )}{\sqrt {\sec (c+d x) a+a}}dx}{3 a}-\frac {2 a (7 A-31 B) \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{3 d}}{5 a}+\frac {2 a (7 A-B) \tan (c+d x) \sec ^2(c+d x)}{5 d \sqrt {a \sec (c+d x)+a}}}{7 a}+\frac {2 B \tan (c+d x) \sec ^3(c+d x)}{7 d \sqrt {a \sec (c+d x)+a}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {-\frac {\int \frac {\csc \left (c+d x+\frac {\pi }{2}\right ) \left (a^3 (7 A-31 B)-2 a^3 (49 A-37 B) \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{\sqrt {\csc \left (c+d x+\frac {\pi }{2}\right ) a+a}}dx}{3 a}-\frac {2 a (7 A-31 B) \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{3 d}}{5 a}+\frac {2 a (7 A-B) \tan (c+d x) \sec ^2(c+d x)}{5 d \sqrt {a \sec (c+d x)+a}}}{7 a}+\frac {2 B \tan (c+d x) \sec ^3(c+d x)}{7 d \sqrt {a \sec (c+d x)+a}}\) |
\(\Big \downarrow \) 4489 |
\(\displaystyle \frac {\frac {-\frac {105 a^3 (A-B) \int \frac {\sec (c+d x)}{\sqrt {\sec (c+d x) a+a}}dx-\frac {4 a^3 (49 A-37 B) \tan (c+d x)}{d \sqrt {a \sec (c+d x)+a}}}{3 a}-\frac {2 a (7 A-31 B) \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{3 d}}{5 a}+\frac {2 a (7 A-B) \tan (c+d x) \sec ^2(c+d x)}{5 d \sqrt {a \sec (c+d x)+a}}}{7 a}+\frac {2 B \tan (c+d x) \sec ^3(c+d x)}{7 d \sqrt {a \sec (c+d x)+a}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {-\frac {105 a^3 (A-B) \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )}{\sqrt {\csc \left (c+d x+\frac {\pi }{2}\right ) a+a}}dx-\frac {4 a^3 (49 A-37 B) \tan (c+d x)}{d \sqrt {a \sec (c+d x)+a}}}{3 a}-\frac {2 a (7 A-31 B) \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{3 d}}{5 a}+\frac {2 a (7 A-B) \tan (c+d x) \sec ^2(c+d x)}{5 d \sqrt {a \sec (c+d x)+a}}}{7 a}+\frac {2 B \tan (c+d x) \sec ^3(c+d x)}{7 d \sqrt {a \sec (c+d x)+a}}\) |
\(\Big \downarrow \) 4282 |
\(\displaystyle \frac {\frac {-\frac {-\frac {210 a^3 (A-B) \int \frac {1}{\frac {a^2 \tan ^2(c+d x)}{\sec (c+d x) a+a}+2 a}d\left (-\frac {a \tan (c+d x)}{\sqrt {\sec (c+d x) a+a}}\right )}{d}-\frac {4 a^3 (49 A-37 B) \tan (c+d x)}{d \sqrt {a \sec (c+d x)+a}}}{3 a}-\frac {2 a (7 A-31 B) \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{3 d}}{5 a}+\frac {2 a (7 A-B) \tan (c+d x) \sec ^2(c+d x)}{5 d \sqrt {a \sec (c+d x)+a}}}{7 a}+\frac {2 B \tan (c+d x) \sec ^3(c+d x)}{7 d \sqrt {a \sec (c+d x)+a}}\) |
\(\Big \downarrow \) 216 |
\(\displaystyle \frac {\frac {-\frac {\frac {105 \sqrt {2} a^{5/2} (A-B) \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{d}-\frac {4 a^3 (49 A-37 B) \tan (c+d x)}{d \sqrt {a \sec (c+d x)+a}}}{3 a}-\frac {2 a (7 A-31 B) \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{3 d}}{5 a}+\frac {2 a (7 A-B) \tan (c+d x) \sec ^2(c+d x)}{5 d \sqrt {a \sec (c+d x)+a}}}{7 a}+\frac {2 B \tan (c+d x) \sec ^3(c+d x)}{7 d \sqrt {a \sec (c+d x)+a}}\) |
(2*B*Sec[c + d*x]^3*Tan[c + d*x])/(7*d*Sqrt[a + a*Sec[c + d*x]]) + ((2*a*( 7*A - B)*Sec[c + d*x]^2*Tan[c + d*x])/(5*d*Sqrt[a + a*Sec[c + d*x]]) + ((- 2*a*(7*A - 31*B)*Sqrt[a + a*Sec[c + d*x]]*Tan[c + d*x])/(3*d) - ((105*Sqrt [2]*a^(5/2)*(A - B)*ArcTan[(Sqrt[a]*Tan[c + d*x])/(Sqrt[2]*Sqrt[a + a*Sec[ c + d*x]])])/d - (4*a^3*(49*A - 37*B)*Tan[c + d*x])/(d*Sqrt[a + a*Sec[c + d*x]]))/(3*a))/(5*a))/(7*a)
3.2.44.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a , 0] || GtQ[b, 0])
Int[csc[(e_.) + (f_.)*(x_)]/Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)], x_S ymbol] :> Simp[-2/f Subst[Int[1/(2*a + x^2), x], x, b*(Cot[e + f*x]/Sqrt[ a + b*Csc[e + f*x]])], x] /; FreeQ[{a, b, e, f}, x] && EqQ[a^2 - b^2, 0]
Int[csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(cs c[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[(-B)*Cot[e + f*x]*(( a + b*Csc[e + f*x])^m/(f*(m + 1))), x] + Simp[(a*B*m + A*b*(m + 1))/(b*(m + 1)) Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^m, x], x] /; FreeQ[{a, b, A, B , e, f, m}, x] && NeQ[A*b - a*B, 0] && EqQ[a^2 - b^2, 0] && NeQ[a*B*m + A*b *(m + 1), 0] && !LtQ[m, -2^(-1)]
Int[csc[(e_.) + (f_.)*(x_)]^2*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*( csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[(-B)*Cot[e + f*x]* ((a + b*Csc[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Simp[1/(b*(m + 2)) Int [Csc[e + f*x]*(a + b*Csc[e + f*x])^m*Simp[b*B*(m + 1) + (A*b*(m + 2) - a*B) *Csc[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, m}, x] && NeQ[A*b - a *B, 0] && !LtQ[m, -1]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[(-B)*d* Cot[e + f*x]*(a + b*Csc[e + f*x])^m*((d*Csc[e + f*x])^(n - 1)/(f*(m + n))), x] + Simp[d/(b*(m + n)) Int[(a + b*Csc[e + f*x])^m*(d*Csc[e + f*x])^(n - 1)*Simp[b*B*(n - 1) + (A*b*(m + n) + a*B*m)*Csc[e + f*x], x], x], x] /; Fr eeQ[{a, b, d, e, f, A, B, m}, x] && NeQ[A*b - a*B, 0] && EqQ[a^2 - b^2, 0] && GtQ[n, 1]
Leaf count of result is larger than twice the leaf count of optimal. \(358\) vs. \(2(177)=354\).
Time = 4.42 (sec) , antiderivative size = 359, normalized size of antiderivative = 1.78
method | result | size |
default | \(-\frac {\sqrt {-\frac {2 a}{\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1}}\, \left (105 A \left (\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1\right )^{\frac {7}{2}} \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )+\sqrt {\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1}\right )-105 B \left (\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1\right )^{\frac {7}{2}} \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )+\sqrt {\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1}\right )-238 A \left (1-\cos \left (d x +c \right )\right )^{7} \csc \left (d x +c \right )^{7}+184 B \left (1-\cos \left (d x +c \right )\right )^{7} \csc \left (d x +c \right )^{7}+518 A \left (1-\cos \left (d x +c \right )\right )^{5} \csc \left (d x +c \right )^{5}-224 B \left (1-\cos \left (d x +c \right )\right )^{5} \csc \left (d x +c \right )^{5}-490 A \left (1-\cos \left (d x +c \right )\right )^{3} \csc \left (d x +c \right )^{3}+280 B \left (1-\cos \left (d x +c \right )\right )^{3} \csc \left (d x +c \right )^{3}+210 A \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )\right )}{105 d a \left (\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1\right )^{3}}\) | \(359\) |
parts | \(-\frac {A \sqrt {-\frac {2 a}{\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1}}\, \left (15 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )+\sqrt {\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1}\right ) \left (\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1\right )^{\frac {5}{2}}-34 \left (1-\cos \left (d x +c \right )\right )^{5} \csc \left (d x +c \right )^{5}+40 \left (1-\cos \left (d x +c \right )\right )^{3} \csc \left (d x +c \right )^{3}-30 \csc \left (d x +c \right )+30 \cot \left (d x +c \right )\right )}{15 d a \left (\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1\right )^{2}}+\frac {B \sqrt {-\frac {2 a}{\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1}}\, \left (105 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )+\sqrt {\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1}\right ) \left (\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1\right )^{\frac {7}{2}}-184 \left (1-\cos \left (d x +c \right )\right )^{7} \csc \left (d x +c \right )^{7}+224 \left (1-\cos \left (d x +c \right )\right )^{5} \csc \left (d x +c \right )^{5}-280 \left (1-\cos \left (d x +c \right )\right )^{3} \csc \left (d x +c \right )^{3}\right )}{105 d a \left (\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1\right )^{3}}\) | \(394\) |
-1/105/d/a*(-2*a/((1-cos(d*x+c))^2*csc(d*x+c)^2-1))^(1/2)*(105*A*((1-cos(d *x+c))^2*csc(d*x+c)^2-1)^(7/2)*ln(csc(d*x+c)-cot(d*x+c)+((1-cos(d*x+c))^2* csc(d*x+c)^2-1)^(1/2))-105*B*((1-cos(d*x+c))^2*csc(d*x+c)^2-1)^(7/2)*ln(cs c(d*x+c)-cot(d*x+c)+((1-cos(d*x+c))^2*csc(d*x+c)^2-1)^(1/2))-238*A*(1-cos( d*x+c))^7*csc(d*x+c)^7+184*B*(1-cos(d*x+c))^7*csc(d*x+c)^7+518*A*(1-cos(d* x+c))^5*csc(d*x+c)^5-224*B*(1-cos(d*x+c))^5*csc(d*x+c)^5-490*A*(1-cos(d*x+ c))^3*csc(d*x+c)^3+280*B*(1-cos(d*x+c))^3*csc(d*x+c)^3+210*A*(-cot(d*x+c)+ csc(d*x+c)))/((1-cos(d*x+c))^2*csc(d*x+c)^2-1)^3
Time = 0.29 (sec) , antiderivative size = 432, normalized size of antiderivative = 2.14 \[ \int \frac {\sec ^4(c+d x) (A+B \sec (c+d x))}{\sqrt {a+a \sec (c+d x)}} \, dx=\left [-\frac {105 \, \sqrt {2} {\left ({\left (A - B\right )} a \cos \left (d x + c\right )^{4} + {\left (A - B\right )} a \cos \left (d x + c\right )^{3}\right )} \sqrt {-\frac {1}{a}} \log \left (-\frac {2 \, \sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {-\frac {1}{a}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 3 \, \cos \left (d x + c\right )^{2} - 2 \, \cos \left (d x + c\right ) + 1}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right ) - 4 \, {\left ({\left (91 \, A - 43 \, B\right )} \cos \left (d x + c\right )^{3} - {\left (7 \, A - 31 \, B\right )} \cos \left (d x + c\right )^{2} + 3 \, {\left (7 \, A - B\right )} \cos \left (d x + c\right ) + 15 \, B\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{210 \, {\left (a d \cos \left (d x + c\right )^{4} + a d \cos \left (d x + c\right )^{3}\right )}}, \frac {2 \, {\left ({\left (91 \, A - 43 \, B\right )} \cos \left (d x + c\right )^{3} - {\left (7 \, A - 31 \, B\right )} \cos \left (d x + c\right )^{2} + 3 \, {\left (7 \, A - B\right )} \cos \left (d x + c\right ) + 15 \, B\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right ) + \frac {105 \, \sqrt {2} {\left ({\left (A - B\right )} a \cos \left (d x + c\right )^{4} + {\left (A - B\right )} a \cos \left (d x + c\right )^{3}\right )} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right )}{\sqrt {a}}}{105 \, {\left (a d \cos \left (d x + c\right )^{4} + a d \cos \left (d x + c\right )^{3}\right )}}\right ] \]
[-1/210*(105*sqrt(2)*((A - B)*a*cos(d*x + c)^4 + (A - B)*a*cos(d*x + c)^3) *sqrt(-1/a)*log(-(2*sqrt(2)*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*sqrt(- 1/a)*cos(d*x + c)*sin(d*x + c) - 3*cos(d*x + c)^2 - 2*cos(d*x + c) + 1)/(c os(d*x + c)^2 + 2*cos(d*x + c) + 1)) - 4*((91*A - 43*B)*cos(d*x + c)^3 - ( 7*A - 31*B)*cos(d*x + c)^2 + 3*(7*A - B)*cos(d*x + c) + 15*B)*sqrt((a*cos( d*x + c) + a)/cos(d*x + c))*sin(d*x + c))/(a*d*cos(d*x + c)^4 + a*d*cos(d* x + c)^3), 1/105*(2*((91*A - 43*B)*cos(d*x + c)^3 - (7*A - 31*B)*cos(d*x + c)^2 + 3*(7*A - B)*cos(d*x + c) + 15*B)*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*sin(d*x + c) + 105*sqrt(2)*((A - B)*a*cos(d*x + c)^4 + (A - B)*a*co s(d*x + c)^3)*arctan(sqrt(2)*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*cos(d *x + c)/(sqrt(a)*sin(d*x + c)))/sqrt(a))/(a*d*cos(d*x + c)^4 + a*d*cos(d*x + c)^3)]
\[ \int \frac {\sec ^4(c+d x) (A+B \sec (c+d x))}{\sqrt {a+a \sec (c+d x)}} \, dx=\int \frac {\left (A + B \sec {\left (c + d x \right )}\right ) \sec ^{4}{\left (c + d x \right )}}{\sqrt {a \left (\sec {\left (c + d x \right )} + 1\right )}}\, dx \]
\[ \int \frac {\sec ^4(c+d x) (A+B \sec (c+d x))}{\sqrt {a+a \sec (c+d x)}} \, dx=\int { \frac {{\left (B \sec \left (d x + c\right ) + A\right )} \sec \left (d x + c\right )^{4}}{\sqrt {a \sec \left (d x + c\right ) + a}} \,d x } \]
Time = 1.37 (sec) , antiderivative size = 252, normalized size of antiderivative = 1.25 \[ \int \frac {\sec ^4(c+d x) (A+B \sec (c+d x))}{\sqrt {a+a \sec (c+d x)}} \, dx=\frac {\frac {105 \, \sqrt {2} {\left (A - B\right )} \log \left ({\left | -\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a} \right |}\right )}{\sqrt {-a} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )} - \frac {2 \, {\left (\frac {105 \, \sqrt {2} A a^{3}}{\mathrm {sgn}\left (\cos \left (d x + c\right )\right )} - {\left ({\left (\frac {\sqrt {2} {\left (119 \, A a^{3} - 92 \, B a^{3}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}}{\mathrm {sgn}\left (\cos \left (d x + c\right )\right )} - \frac {7 \, \sqrt {2} {\left (37 \, A a^{3} - 16 \, B a^{3}\right )}}{\mathrm {sgn}\left (\cos \left (d x + c\right )\right )}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + \frac {35 \, \sqrt {2} {\left (7 \, A a^{3} - 4 \, B a^{3}\right )}}{\mathrm {sgn}\left (\cos \left (d x + c\right )\right )}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a\right )}^{3} \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}}}{105 \, d} \]
1/105*(105*sqrt(2)*(A - B)*log(abs(-sqrt(-a)*tan(1/2*d*x + 1/2*c) + sqrt(- a*tan(1/2*d*x + 1/2*c)^2 + a)))/(sqrt(-a)*sgn(cos(d*x + c))) - 2*(105*sqrt (2)*A*a^3/sgn(cos(d*x + c)) - ((sqrt(2)*(119*A*a^3 - 92*B*a^3)*tan(1/2*d*x + 1/2*c)^2/sgn(cos(d*x + c)) - 7*sqrt(2)*(37*A*a^3 - 16*B*a^3)/sgn(cos(d* x + c)))*tan(1/2*d*x + 1/2*c)^2 + 35*sqrt(2)*(7*A*a^3 - 4*B*a^3)/sgn(cos(d *x + c)))*tan(1/2*d*x + 1/2*c)^2)*tan(1/2*d*x + 1/2*c)/((a*tan(1/2*d*x + 1 /2*c)^2 - a)^3*sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a)))/d
Timed out. \[ \int \frac {\sec ^4(c+d x) (A+B \sec (c+d x))}{\sqrt {a+a \sec (c+d x)}} \, dx=\int \frac {A+\frac {B}{\cos \left (c+d\,x\right )}}{{\cos \left (c+d\,x\right )}^4\,\sqrt {a+\frac {a}{\cos \left (c+d\,x\right )}}} \,d x \]